--快速弹夹
local kuaisudajia = fk.CreateSkill {
    name = "mcdh_kuaisudajia",
    tags = {Skill.Compulsory}
}

local U = require "packages/utility/utility"
local lib = require "packages/mcdh/lib"

kuaisudajia:addEffect(fk.CardUseFinished,{
    can_trigger = function(self, event, target, player, data)
        local room = player.room
        local logic = room.logic
        if player:hasSkill(self) and target == player and player.phase ~= Player.NotActive then
            return #logic:getActualDamageEvents(1, function(e) return e.data[1].from == player end) ~= 1 and lib.mcdh_getLoseammo(player) > 0 and #Card:getIdList(data.card) ~= 0
        end
    end,
    on_use = function(self, event, target, player, data)
        lib.LoadAmmo(player,player,1,self.name)
    end
})

Fk:loadTranslationTable {
    ["mcdh_kuaisudajia"] = "快速弹夹",
    [":mcdh_kuaisudajia"] = "锁定技，你的回合内，当你使用一张实体牌后，若你于本回合内未造成过伤害，则你装填一枚弹药。"
}

return kuaisudajia